﻿<!DOCTYPE html>
<html>

<head>
	<meta charset="UTF-8">
	<title>直播账号</title>
	<link rel="stylesheet" href="css/common2.css">

	<style>
		.one {
			width: 9%;
		}
	</style>
</head>

<body class="main-body">
	<div id="vue-root" style="margin-top: 20px;">

		<div class="add" v-if="able.add">
			<a href="ys7_item.html" style="color: white">添加账号</a>
		</div>
		<div class="refresh" onclick="location.reload()" style="margin-left: 0;">刷新</div>

		<br>
		<div class="table">
			<table class="table_top">
				<thead>
					<tr>
						<th class="two">
							<input type="checkbox" class="check-box" v-model="all">
						</th>
						<th>序号</th>
						<th class="four">名称</th>
						<th class="four">AppKey</th>
						<th class="four">Secret</th>
						<th class="three" v-if="able.edit||able.del">编辑/删除</th>
					</tr>
				</thead>
				<tbody id="list">
					<tr v-for="(ys7,index) in list" :key="ys7.id">
						<td>
							<input type="checkbox" class="check-box" v-model="ys7.checked">
						</td>
						<td><span v-text="index+1"></span></td>
						<td class="four" v-text="ys7.name"></td>
						<td class="four" v-text="ys7.appKey"></td>
						<td class="four" v-text="ys7.secret"></td>
						<td class="three" v-if="able.edit||able.del">
							<div class="option">
								<div v-if="able.edit" class="edit-icon option-icon">
									<a :href="'ys7_item.html?id='+ys7.id"
										style="position: absolute; left: 20%; top: 30%;">
										<img class="img" src="../image/edit.png" height="20" width="20"
											onmouseover="this.src='image/edit_light.png'"
											onmouseout="this.src='image/edit.png'" />
									</a>
								</div>
								<div v-if="able.del" class="delete-icon option-icon" @click="del([ys7.id])"
									style="right: 20%; top:30%;position: absolute;">
									<img class="img" src="../image/delete.png" height="20" width="20"
										onmouseover="this.src='image/delete_light.png'"
										onmouseout="this.src='image/delete.png'" />
								</div>
							</div>
						</td>
					</tr>
				</tbody>
			</table>
		</div>

		<div class="delete" @click="batchDelete" v-if="able.del||total>1">批量删除</div>
		<ul class="pagination" v-if="pages>1">
			<li>
				<a v-if="pageNum!=1" @click="pageNum=1">«</a>
				<a class="pages-jump" v-if="pageNum!=1" @click="pageNum--">‹</a>
				<a v-text="pageNum"></a>
				<a class="pages-jump" v-if="pageNum!=pages" @click="pageNum++">›</a>
				<a v-if="pageNum!=pages" @click="pageNum=pages">»</a>
			</li>
		</ul>
	</div>

	<script src="/scriptZIP/qs.min.js"></script>
	<script src="/scriptZIP/vue.min.js"></script>
	<script src="/scriptZIP/axios.min.js"></script>

	<script src="/js/common.js"></script>
	<script src="/js/list.js"></script>
	<script src="/js/auth_util.js"></script>

	<script>

		var app = new Vue(merge({
			data: {
				urls: {
					del: '/pc/ys7/del',
					list: '/pc/ys7/list'
				}
			},
			created: function () {
				if (/agent/.test(top.location.href))
					this.search.agentId = top_params().id;

				this.getData();
				abled('ys7', this);
			}
		}));
	</script>

</body>

</html>